﻿using Mate.Db.Model.Good;
using Mate.Db.SqlSugar;
using Mate.Dto.Good;
using System;
using System.Collections.Generic;
using System.Text;

namespace Mate.Good.Service
{
    public interface IGoodService : IDataService<mp_good>
    {
        /// <summary>
        /// 获取商品列表
        /// </summary>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">每页条数</param>
        /// <param name="key">搜索关键字</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
        IList<GoodModel> GetGoodList(int pageIndex, int pageSize, string key, ref int totalCount);

        /// <summary>
        /// 获取商品详情
        /// </summary>
        /// <param name="id">商品id</param>
        /// <returns></returns>
        GoodModel GetGood(int id);
    }
}
